<?php

function get_teamtausch_erlaubt($u)
{
	include("inc_configuration.php");
	
	$qs = "SELECT * FROM $tbl_season s WHERE s.active=1";
	$qse = mysql_query($qs);
	$qseo = mysql_fetch_object($qse);
	$season = $qseo->id;
	
	$query = "	SELECT tw.id
				FROM
					$tbl_trainerwechsel tw,
					$tbl_combinations c
				WHERE
					tw.combinationId=c.id AND
					c.userId=$u AND
					tw.type=1 AND
					tw.seasonId=$season AND
					tw.reason='Teamtausch'";

	$q = mysql_query($query);

	$c = mySQL_num_rows($q);

	if ($c>=$maxtausch)
	{
		$e=0;
	}
	else
	{
		$e=1;
	}
	
	
	return ($e);
}
//echo 'Sie werden weitergeleitet... <meta http-equiv="refresh" content="3; URL=lima.php">   ';

?>